<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="hello">
        <h1>{{message}}</h1>
        <!-- 语法糖 -->
        <button @click="add">+</button>
        <button @click="jian">-</button>
        <input type="text" @keyup="jian" placeholder="按钮减"></input>
        <button v-on:mousemove="add">移动增</button>
    </div>
    <script src="../vue.js"></script>
    <script>
        const vue01 = new Vue({
            el: '.hello',
            data: {
                message: 0,
            },
            methods: {
                add(){
                    this.message++;
                },
                jian(){
                    this.message--;
                }
            },
            
        })
    </script>
</body>

</html>